package cn.tedu.oop;
/**本类用于OOP巩固练习*/
public class TestCar {
    public static void main(String[] args) {
        
        Car c1=new Car();
        c1.brand="宝马";
        c1.color="五彩斑斓的黑";
        c1.speed=100.1;
        c1.id=666;
        c1.load=4;
        System.out.println(c1.brand);
        System.out.println(c1.id);
        System.out.println(c1.color);
        System.out.println(c1.speed);
        System.out.println(c1.load);
        c1.start();
        c1.stop();

        Car c2=new Car();
        c2.brand="特斯拉";
        c2.color="黑不溜秋的白";
        c2.speed=120.5;
        c2.id=34;
        c2.load=2;
        System.out.println(c2.brand);
        System.out.println(c2.id);
        System.out.println(c2.color);
        System.out.println(c2.speed);
        System.out.println(c2.load);

        
    }
}
//1.定义汽车类型Car
//2.定义汽车类型的各种属性
//brand color speed id 载客量load
//3.定义汽车类的启动功能start(),打印：我的小车车启动啦~
//4.定义汽车类的停止功能stop（）,打印：哎呀妈呀熄火了~
class Car{
    String brand;
    String color;
    double speed;
    int id;
    int load;
    public void start(){
        System.out.println("我的小车车启动啦~");

    }
    public static void stop(){
        System.out.println("哎呀妈呀熄火了~");

    }


}